import { createApp } from 'vue'
import Antd from 'ant-design-vue';
import App from './App.vue'
import router from './router'
import store from './store'
import 'ant-design-vue/dist/reset.css';
import axios from 'axios';

axios.defaults.baseURL = process.env.VUE_APP_SERVER

/**
 * axios拦截器
 */
axios.interceptors.request.use(function (config) {
    console.log('mian----请求参数：', config);
    return config;
  }, error => {
    console.log('mian----请求失败：', error);
    return Promise.reject(error);
  });

axios.interceptors.response.use(function (response) {
    console.log('mian----返回结果：', response);
    return response;
}, error => {
    console.log('mian----返回失败：', error);
    return Promise.reject(error);
});


const app = createApp(App)

app.use(store).use(router).use(Antd).mount('#app')
